Conventionally, there is a game system where a plurality of players execute an online game using a network. In such a game system, a watcher can connect to the game system and watch an online game executed by a plurality of players.
In the conventional game system, however, there is room for improvement in providing an image easy for the watcher watching the game to view.
Therefore, it is an object of an exemplary embodiment to provide an information processing program, an information processing system, an information processing apparatus, and an information processing method that are capable of providing an image easy for a viewer viewing a game to view, and of also allowing viewing with a high degree of freedom.
To achieve the above object, the exemplary embodiment employs the following configurations.
A non-transitory storage medium having stored therein an information processing program according to the exemplary embodiment is a non-transitory storage medium having stored therein an information processing program executed by a computer of an information processing apparatus. The information processing program causes the computer to execute a play data acquisition step, an object control step, a mode switching step, a first camera control step, a second camera control step, a during-switching camera control step, and a game image generation step. In the play data acquisition step, play data generated based on an operation performed by another player on another information processing apparatus while a multiplay game is executed is acquired. In the object control step, in a virtual space where the multiplay game is performed and based on the acquired play data, a position of at least one object including a player character operated by the other player is updated. In the mode switching step, based on an instruction from an operator, a mode regarding a virtual camera in the virtual space is switched to a first mode and a second mode. In the first camera control step, in the first mode and based on a movement operation of the operator, the virtual camera is moved so that a height of the virtual camera is a height set in advance in accordance with a position specified based on the movement operation. In the second camera control step, in the second mode and based on the acquired play data, the virtual camera is moved by following a specified object. In the during-switching camera control step, when the mode is switched in the mode switching step, the virtual camera is moved from a position of the virtual camera in the mode before the switching to a position of the virtual camera in the mode after the switching, and a direction of the virtual camera during the movement is also calculated and updated. In the game image generation step, based on the virtual camera, a game image of the virtual space is generated.
Based on the above, in a first mode, a virtual camera is set to a height determined in advance in accordance with a position. Thus, an operator does not need to adjust the height, and a game image appropriate for the operator can be generated by a simple operation. Further, when the mode of the virtual camera is switched, the direction of the virtual camera during movement is calculated, and the state where the virtual camera moves from a position before the switching to a position after the switching is displayed. Thus, when switching the virtual camera, the operator can easily understand from which position to which position in a virtual space the virtual camera moves.
Further, the specified object may be the player character operated by the other player.
Based on the above, it is possible to switch a first mode where the virtual camera can be moved based on a movement operation of the operator, and a second mode where the virtual camera follows a player character operated by another player.
Further, a height map including at least one surface may be set in the virtual space. The information processing program may cause the computer to, in the first camera control step, based on the movement operation, move a gaze point or a viewpoint of the virtual camera on the surface of the height map.
Based on the above, based on a height map set in the virtual space, it is possible to move a gaze point or a viewpoint of the virtual camera. For example, when the height map is set at a position higher than that of an object in the virtual space, it is possible to prevent the virtual camera from coming into contact with the object in the virtual space in the process of moving the virtual camera in the first mode.
Further, the information processing program may cause the computer to, in the first camera control step, based on the movement operation, move the gaze point of the virtual camera on the surface of the height map and determine as the viewpoint of the virtual camera a position a certain distance away from the gaze point in a certain direction.
Based on the above, the gaze point of the virtual camera is moved on the height map, whereby it is possible to move the virtual camera. Since the gaze point is moved, it is possible to make it easy for the operator to move the virtual camera in accordance with an object to which the operator wishes to pay attention.
Further, the information processing program may further cause the computer to execute an orientation control step of, based on an operation of the operator, changing an orientation of the virtual camera at the determined viewpoint of the virtual camera.
Based on the above, it is possible to move the gaze point on the height map, set the viewpoint based on the gaze point, and change the orientation (the direction) of the virtual camera at the viewpoint set based on the gaze point.
Further, in the mode switching step, based on an instruction from the operator, the mode regarding the virtual camera may be further switched to a third mode. The information processing program may further cause the computer to execute a third camera control step of, in the third mode, moving the virtual camera by following an object other than the player character.
Based on the above, it is possible to move the virtual camera by following the object other than a player character, and it is possible to pay attention to the object. Consequently, for example, the operator can always view an important object in a game.
Further, in the mode switching step, based on an instruction from the operator, the mode regarding the virtual camera may be further switched to a fourth mode. The information processing program may further cause the computer to execute a fourth camera setting step of, in the fourth mode, setting the virtual camera at a certain position in the virtual space.
Based on the above, it is possible to further set the virtual camera at the certain position in the virtual space. For example, the operator can fix the virtual camera at a position where a wide range in the virtual space is overlooked, and can view a wide range in the virtual space.
Further, in the other information processing apparatus, based on an operation of the other player, the player character corresponding to the other player and a position and a direction of the virtual camera corresponding to the player character may be controlled, and a game image based on the virtual camera may be generated. The information processing program may cause the computer to, in the second camera control step, based on the play data, control the virtual camera so that the position and the direction of the virtual camera are the same as a position and a direction of a virtual camera controlled by the other information processing apparatus in which the specified player character is operated.
Based on the above, the operator of the information processing apparatus can view a game image viewed in another information processing apparatus by another player.
Further, the play data acquired in the play data acquisition step may at least include the position of the player character and the direction of the virtual camera corresponding to the player character.
Based on the above, it is possible to receive the position of a player character and the direction of the virtual camera as play data, and based on the received play data, set the direction of the virtual camera.
Further, the multiplay game may be a game where based on an instruction from a player, shooting is performed in a direction corresponding to the direction of the virtual camera corresponding to the player character.
Based on the above, it is possible to execute a game where shooting is performed in a direction corresponding to the direction of the virtual camera, and the operator can view the game.
Further, another example of the exemplary embodiment is an information processing system, including a plurality of information processing apparatuses, for executing a multiplay game. The information processing system includes a play data generation section, an object control section, a first display control section, a mode switching section, a first camera control section, a second camera control section, a during-switching camera control section, and a second display control section. The play data generation section generates play data based on an operation performed by a player on a first information processing apparatus among the plurality of information processing apparatuses. The object control section, in a virtual space where the multiplay game is performed and based on the play data, updates a position of at least one object including a player character operated by the player. The first display control section, based on the play data, controls a first virtual camera in the virtual space, and based on the first virtual camera, generates a game image of the virtual space, and display the generated game image on a display device of the first information processing apparatus. The mode switching section, based on an instruction from an operator of a second information processing apparatus among the plurality of information processing apparatuses, switches a mode regarding a second virtual camera in the virtual space to a first mode and a second mode. The first camera control section, in the first mode and based on a movement operation of the operator of the second information processing apparatus, moves the second virtual camera so that a height of the second virtual camera is a height set in advance in accordance with a position specified based on the movement operation. The second camera control section, in the second mode and based on the play data, moves the second virtual camera by following a specified object. The during-switching camera control section, when the mode is switched by the mode switching section, moves the second virtual camera from a position of the second virtual camera in the mode before the switching to a position of the second virtual camera in the mode after the switching, and calculates and updates a direction of the second virtual camera during the movement. The second display control section generates a game image of the virtual space based on the second virtual camera and display the generated game image on a display device of the second information processing apparatus.
Further, yet another exemplary embodiment may be an information processing apparatus for executing the information processing program. Further, yet another exemplary embodiment may be an information processing method performed by the information processing system.
According to the exemplary embodiment, a virtual camera is set at a height determined in advance. Thus, an operator can view a virtual space from an appropriate viewpoint by a simple operation.
These and other objects, features, aspects and advantages of the exemplary embodiments will become more apparent from the following detailed description of the exemplary embodiments when taken in conjunction with the accompanying drawings.